import Vue from 'vue';
import App from './App';
import store from './store/index';
import { RouterMount } from './router/index';
import { bootstrap, UI } from './core';

// 全局组件
import AiSearch from './components/AiSearch'
Vue.component('ai-search',AiSearch);

// 引入工具类
import './utils/globalFilter';  // 全局过滤器
import './utils/globalFn'; // 全局方法

Vue.config.productionTip = false;
Vue.mixin(UI);
App.mpType = 'app';

bootstrap({ store }).then(({ store, service }) => {
	Vue.prototype.$service = service;

	const app = new Vue({
		...App,
		store
	});
	// #ifdef H5
	RouterMount(app, '#app');
	// #endif

	// #ifndef H5
	app.$mount();
	// #endif
});
